Developing RESTful Web Services with Jersey 2.0 by 2013
Author:2013
Language: eng
Format: mobi
Publisher: Packt Publishing
The put method
The HTTP put method invokes the request. This method is requested synchronously by default:
WebTarget target = client.target("http://localhost:8080/Chapter2/services/putResource"); MultivaluedMap<String, String> putForm = new MultivaluedHashMap<String, String>(); putForm.add("name", "John"); String responseData = target.request().put(Entity.form(putForm),String.class);
It is the same as the post method. In order to consume the put method, we have the put(...) method of the Builder class.
On the server side, it will first identify the root-resource getResource and then check for the matching resource method put() to process the request. The resource method is mapped according to the matching URI template, that is, either a subresource or the validator, or the @Produces media type or the @Consumes media type is applied on resource method:
@PUT public String put(@FormParam("name") String name){ return "Hello, " + name; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(25282)
Hello! Python by Anthony Briggs(24334)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(23420)
Kotlin in Action by Dmitry Jemerov(22503)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(21961)
Dependency Injection in .NET by Mark Seemann(21837)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(20705)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(19517)
Grails in Action by Glen Smith Peter Ledbrook(18595)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17031)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(15836)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(13683)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(11851)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11151)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10621)
Hit Refresh by Satya Nadella(9187)
The Kubernetes Operator Framework Book by Michael Dame(8563)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8400)
Robo-Advisor with Python by Aki Ranin(8358)